function pAjax(options){
    return new Promise((resolve,reject)=>{
        let xhr=new XMLHttpRequest()
        if(options.params){
            let str = '?'
            for(let key in options.params){
                str += `${key}=${options.params[key]}`
                str += '&'
            }
            str = str.slice(0, -1)
            xhr.open('get',options.url+str)
        }
    })
}